home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4280 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.lang.c
  2. Path: howland.reston.ans.net!torn!utnut!utinfo!news
  3. From: Dave Goldstein <dave.goldstein@utoronto.ca>
  4. Subject: HELP!!!!!!!
  5. X-Nntp-Posting-Host: breath.dialin.utoronto.ca
  6. Content-Type: text/plain; charset=us-ascii
  7. Message-ID: <3112CFDA.85@utoronto.ca>
  8. Sender: news@utcc.utoronto.ca (News)
  9. Content-Transfer-Encoding: 7bit
  10. Organization: UTCC Campus Access
  11. Mime-Version: 1.0
  12. Date: Sat, 3 Feb 1996 03:00:42 GMT
  13. X-Mailer: Mozilla 2.0b6a (Win95; I)
  14.  
  15. I am a frustrated new C programmer, with a big headache:
  16. I've composed a linked list in a function, and I am passing the HEAD of 
  17. the list into the function.  Of course, when I pass this into the 
  18. function, I have to dereference it twice (**head) since I pass it in as 
  19. &head.  Anyway, to make a long story short, when I try accessing the 
  20. first item in the linked list (assuming there is one), I have tried 
  21. accessing it as **head->next which C doesn't seem to like. WHY????!!
  22. It keeps giving me an error "Pointer to structure required on left side 
  23. of -> or ->* in function ....".  Isn't that what I'm doing??
  24.  
  25. Please help, I'm beginning to feel suicidal!
  26. If you wish to mail me please write to:
  27.  
  28. dave.goldstein@utoronto.ca
  29.  
  30. I'll be forever in your debt!  Thanks.
  31.